<%= render :partial=>'mailmenu' %>
<div align="left">
	<p>
	<table class="fill_body">
		<tr><th colspan="4"><%=@page_title ||= 'Mensajes enviados'%></th></tr>
		<tr><th>Enviado el</th><th>A</th><th>Asunto</th><th></th></tr>
		<%n=0%>
		<% for mail in @mails %>
		<%n+=1%>
			<%if mail.read then%>
				<tr class="row<%=n%2%>">
			<%else%>
				<tr class="row<%=n%2%>_highlight">
			<%end%>
				<td><%= mail.created_at.strftime(DATETIME_FMT)%></td>
				<td>
					<% for reciept in mail.message.recipients do %>
						<%=h reciept.login %>
					<% end %>
				</td>
				<td><%= link_to h(short_string(mail.message.subject)), :action=>'leer', :id=>mail%></td>
				<td><%= link_to 'Eliminar', :action=>'delete',:id=>mail, :confirm=>"Seguro que desea eliminar?"%></td>
			</tr>
		<% end %>
	</table>
	</p>
</div>
